
<h1>{$class.class_name}: {$fieldname}</h1>
{if is_array($config) }

	<form id="form_fieldconfig_id_{$class.class_id}">
		<input type="hidden" name="class_id" value="{$class.class_id}" />
		<input type="hidden" name="type" value="{$type}" />
		{foreach name="formfieldloop" item=field from=$config}
				{if file_exists("`$CMS_TPL_DIR`forms/`$field.tpl_file`")}
					{include file="`$CMS_TPL_DIR`forms/`$field.tpl_file`" content=$field obj=$obj prefix="formfield[$fieldname]"}
				{else}
					<strong>MISSING template file &laquo; {$CMS_TPL_DIR}forms/{$field.tpl_file} &raquo;</strong> for formtype: {$field.formtype}<br />
				{/if}
				<hr style="width:100%" color="#CCCCCC" noshade="noshade" size=1 />
		{/foreach}
			<div class="divFormFieldLabel">&nbsp;</div>
			<div class="divFormFieldInput">
				<input type="button" name="submitbtn" value="speichern" class="submitbtn" onclick="{strip}
				
				foo=function()
				{literal}
				{
					try{ tinyMCE.triggerSave(false, false);
					xajax.request({ccdsclass:'ccdsClassEditor',ccdsfun:'ClassEditorClassConfigFieldSave'},{parameters:[xajax.getFormValues('form_fieldconfig_id_{/literal}{$class.class_id}{literal}')]});
					
					}catch(ex)
					{
						console.log(ex);
					}
				}; foo();{/literal}
				
				{/strip}"/>
				{if 'data' == $type}
					<input type="button" name="submitbtn" value="abbrechen" class="submitbtn" onclick="{literal}xajax.request({ccdsclass:'ccdsClassEditor',ccdsfun:'ClassEditorClassConfig'},{parameters:[{class_id:{/literal}{$class.class_id}{literal}}]});{/literal}"/>
				{else}
					<input type="button" name="submitbtn" value="abbrechen" class="submitbtn" onclick="{literal}xajax.request({ccdsclass:'ccdsClassEditor',ccdsfun:'ClassEditorClassParameterConfig'},{parameters:[{class_id:{/literal}{$class.class_id}{literal}}]});{/literal}"/>
				{/if}
			</div>
			<br style="clear:both;" />
	</form>
	</div>
{/if}